package gov.child.entities.vo;

import gov.child.entities.po.EUser;
import gov.child.entities.vo.annotation.Alias;

/**
 * @author fzh
 * @since 2017/9/12
 */
public class User {
    // static util field and method
    public static final User EMPTY_USER_INFO = new User();

    public static User parseFrom(EUser p) {
        return BeanTransformer.transform(User.class, p);
    }

    public static EUser parseTo(User p) {
        return BeanTransformer.transform(EUser.class, p);
    }

    @Alias("id")
    private Integer userId;
    private String username;
    private String idNum;
    private String phone;
    private String name;
    private String email;
    private String birthplace;
    private Byte gender;
    private String nation;
    private String homeaddress;
    private String education;
    private String politicalstatus;
    private Integer postcode;

    public User() {
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getIdNum() {
        return idNum;
    }

    public void setIdNum(String idNum) {
        this.idNum = idNum;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getBirthplace() {
        return birthplace;
    }

    public void setBirthplace(String birthplace) {
        this.birthplace = birthplace;
    }

    public Byte getGender() {
        return gender;
    }

    public void setGender(Byte gender) {
        this.gender = gender;
    }

    public String getNation() {
        return nation;
    }

    public void setNation(String nation) {
        this.nation = nation;
    }

    public String getHomeaddress() {
        return homeaddress;
    }

    public void setHomeaddress(String homeaddress) {
        this.homeaddress = homeaddress;
    }

    public String getEducation() {
        return education;
    }

    public void setEducation(String education) {
        this.education = education;
    }

    public String getPoliticalstatus() {
        return politicalstatus;
    }

    public void setPoliticalstatus(String politicalstatus) {
        this.politicalstatus = politicalstatus;
    }

    public Integer getPostcode() {
        return postcode;
    }

    public void setPostcode(Integer postcode) {
        this.postcode = postcode;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId=" + userId +
                ", username='" + username + '\'' +
                ", idNum='" + idNum + '\'' +
                ", phone='" + phone + '\'' +
                ", name='" + name + '\'' +
                ", email='" + email + '\'' +
                ", birthplace='" + birthplace + '\'' +
                ", gender=" + gender +
                ", nation='" + nation + '\'' +
                ", homeaddress='" + homeaddress + '\'' +
                ", education='" + education + '\'' +
                ", politicalstatus='" + politicalstatus + '\'' +
                ", postcode=" + postcode +
                '}';
    }
}
